<!DOCTYPE html> 
<html>
<head>
<meta charset="utf-8">
<title>My Web Application</title>
<meta  name="viewport" content="width=divice-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile.structure-1.4.5.min.css" />
<link rel="stylesheet" type="text/css" href="../themes/Theme_app.css">
<link rel="stylesheet" type="text/css" href="../themes/jquery.mobile.icons.min.css">
<link rel="stylesheet" type="text/css" href="../themes/Theme_app.min.css">
<link rel="stylesheet" type="text/css" href="../css/Css_Header.css">
<link rel="stylesheet" type="text/css" href="../css/table.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head> 
<body> 

<div data-role="page" id="page">
	<div data-role="header">
		<h1>My Web Application</h1>
	</div>
    <div >
         <img src="../images/banner.jpg" width="1500" height="100">   
    </div> 
    <div align="center" id="container">
         เพิ่มคำถามใหม่
    </div>
<form name="form1" method="post" action="pageupload.php" enctype="multipart/form-data">
Picture : <input type="file" name="file" >
<input type="text" name="image_name" placeholder="ใส่รายละเอียดรูปภาพ">

<input type="submit" name="submit" id="submit" value="บันทึก">
</form>
<a href="index_admin.php" class="ui-btn ui-icon-arrow-l ui-btn-icon-left">กลับหน้าเมนูหลัก</a>
    <br />
    <?
	include('../connect/connect.php');	
	$strSQL = "SELECT * FROM image order by id DESC";
	$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>

<div class="table">	
<?
	$i=0;
	while($objResult = mysql_fetch_array($objQuery))
	{
		$i++;
?>
<div class="tr">
<div class="td"><?php echo "$i" ?></div>
<div class="td"><img src="../images/<?php echo $objResult["image_path"];?>" width="75" height="75"></div>
<div class="td"><?=$objResult["image_name"];?></center></td>
<div class="td"><a href="PageUploadToMySQL4.php?id=<?=$objResult["id"];?>">Edit</a></div>
<div class="td"><a href="JavaScript:if(confirm('Confirm Delete?')==true){window.location='PageDelete.php?id=<?php echo $objResult["id"];?>';}">Delete</a></div>
</div>

<?
	}
?>
</div>
<?
mysql_close($objConnect);
?>

</body>
</html>